home *** CD-ROM | disk | FTP | other *** search
-
- Nifty James' Stack Checker
- For Microsoft C
-
- Version 1.00 of 31 March, 1989
-
- (C) Copyright 1989 by Mike Blaszczak, All Rights Reserved.
-
-
- Description
- -----------
-
- The NJSTACK Package contains a set of .OBJ files that may be linked
- with existing programs or programs that are under development. These
- .OBJ files contain a redefined version of Microsoft's _chkstk
- routine.
-
- _chkstk is used to set up space for local variables and to ascertain
- the amount of space left on the stack. It is called before the
- beginning of each C function, when stack-checking is not turned off
- with the /Gs compiler option. If there is not enough stack space,
- the routine terminates the program with the error message
-
-
-
-
-
-
- Function
- --------
-
- While developing software, especially very large programs, it is
- often necessary to make sure that there will be enough stack space
- for all conditions. NJSTACK's modified _chkstk routine maintains a
- globally available variable called highmark. This variable, of type
- size_t, marks the highest point that the stack has reached since the
- program began executing.
-
- This information can be printed out after the program finishes to see
- if the stack selected is big enough for the program. It may also be
- displayed, stored, or used to cause the program to take corrective
- measures or to bail out cleanly before any serious trouble is caused.
-
-
-
- Use
- ---
-
- You may use LINK to insert NJSTACK into any of your programs. First,
- compile all of your sourcecode and produce all of the object modules
- necessary. Then, specify the appropriate version of NJSTACK on the
- command line for LINK. For example, one might rebuild the STAKDEMO
- program by using these commands:
-
- cl -Zi -c stakdemo.c
- link stakdemo+njstacks /noe /noi /codeview;
-
- The first command compiles stakdemo.c and does not link the resulting
- .OBJ file. The second command links stackdemo with njstacks, and
- lets the linker know that we will be redefining entries in the
- standard library.
-
- If you use NJSTACK often, you may wish to completely replace the
- _chkstk routine provided by Microsoft in the run-time library. To do
- this, use a LIB utility to remove the chkstk module supplied by
- Microsoft, and add the appropriate njstack version to the library.
-
- To change the SLIBCE.LIB library, for example, to use NJSTACK, we
- would use the command
-
- lib slibce.lib -chkstk +njstacks
-
- The four versions of NJSTACK are named as follows:
-
- NJSTACKS.OBJ - njstack for the small model
- NJSTACKM.OBJ - njstack for the medium model
- NJSTACKC.OBJ - njstack for the compact model
- NJSTACKL.OBJ - njstack for the large model
-
- To use NJSTACK with the huge model, use NJSTACKL.
-
- You may run the STACKDEMO.EXE file to
-
-
-
- Registration
- ------------
-
- You may register your copy of NJSTACK by sending $10 to my address
- below. Previous users of my software may notice the conspicuous
- lack of sourcecode. I have decided not to include the sourcecode for
- this program, and all of my future releases, so that the resulting
- packaged file will be smaller. If you would like to receive the
- sourcecode, please include an extra dollar with your registration.
-
- NJSTACK includes no known bugs. This version works with MS-DOS
- programs compiled under versions 5.00 and 5.10 of Microsoft C. I
- have not tested it with earlier versions of the compiler, but I
- suspect that it will properly function with at least Version 4.00 of
- the compiler.
-
- The program will not function properly with C programs compiled under
- OS/2 or MS/2. If you need a version of NJSTACK to funciton with
- these operating systems, you should contact me with your request.
-
-
- You may send your registration and any correspondence or questions to:
-
-
- Mike Blaszczak
- 112 Verlinden Drive
- Monroeville, Pennsylvania
- 15146-2041
-
-
- Thank you for your registration.
-
-
-